package com.zhentao.ai.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 时间序列数据点
 * @author zhentao
 * @date 2024-12-19
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DataPoint {
    
    /**
     * 时间戳
     */
    private LocalDateTime timestamp;
    
    /**
     * 数值
     */
    private BigDecimal value;
    
    /**
     * 标签/分类
     */
    private String label;
    
    /**
     * 权重 (可选)
     */
    private Double weight = 1.0;
    
    public DataPoint(LocalDateTime timestamp, BigDecimal value) {
        this.timestamp = timestamp;
        this.value = value;
    }
    
    public DataPoint(LocalDateTime timestamp, BigDecimal value, String label) {
        this.timestamp = timestamp;
        this.value = value;
        this.label = label;
    }
}